<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>添加组队阵容</title>
    <style>
        .two-part-label{
            width: 200px !important;
        }
    </style>
</head>
<body>
<form class="layui-form" lay-filter="layui-form">
    <div class="mainBox">
        <div class="main-container">
            <div class="layui-form-item">
                <label class="layui-form-label">
                    <text style="color:red;">*</text>
                    阵容名称</label>
                <div class="layui-input-block">
                    <input type="text" name="team_name" placeholder="请输入阵容名称" class="layui-input" lay-verify="required"
                           autocomplete="off">
                </div>
            </div>


            <div class="layui-form-item">
                <label class="layui-form-label">
                    自定义标签</label>
                <div class="layui-input-block">
                    <input type="text" name="tag" placeholder="请输入自定义标签" class="layui-input"
                           autocomplete="off">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">作者</label>
                <div class="layui-input-block">
                    <div class="xmSelect"
                         data-name="author_id"
                         data-sourceType="route"
                         data-source="/admin.genshinteam.author/index?special=true"
                         data-textField="author_name"
                         data-valueField="id"
                         data-paging="true"
                         data-radio="true"
                         data-layVerify="required"
                         data-direction="down"
                    ></div>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label"><text style="color:red;">*</text>通关关卡</label>
                <div class="layui-input-block">
                    <div id="pass" class="xmSelect pass"
                         data-name="keywords"
                         data-sourceType="route"
                         data-source="/admin.genshinteam.category/index"
                         data-params='{"search_param":{"is_show":{"value":1,"condition":"="}}}'
                         data-sourceTree="true"
                         data-radio="false"
                         data-max="3"
                         data-textField="name"
                         data-valueField="name"
                         data-onchange="changePass"
                    ></div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <text style="color:red;">*点击上行阵容按钮添加/取消下行阵容</text>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label"><text style="color:red;">*</text>阵容</label>
                <div class="layui-input-block">
                    <div class="layui-panel" style="padding: 5px;">
                        <label class="layui-btn layui-btn-primary layui-border-green" onclick="showTeamBox()" style="text-align: left !important;">上行阵容</label>
                        <blockquote class="layui-elem-quote" style="margin-top: 10px">位置1</blockquote>
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">角色</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="role xmSelect"
                                         data-name="top_main_role_id"
                                         data-sourceType="route"
                                         data-source="/admin.genshinteam.role/index"
                                         data-textField="role_name"
                                         data-valueField="id"
                                         data-paging="true"
                                         data-radio="true"
                                         data-layVerify="required"
                                         data-direction="down"
                                    ></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">位置</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="top_main_role_pos"
                                         data-sourceType="data"
                                         data-radio="true"
                                         data-source="[{name:'主C',value:'主C'},{name:'副C',value:'副C'},{name:'辅助',value:'辅助'},{name:'治疗',value:'治疗'}]"
                                    ></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">武器</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="top_main_role_weapon"
                                         data-sourceType="route"
                                         data-source="/admin.genshinteam.weapon/weapon"
                                         data-textField="name"
                                         data-valueField="weapon_id"
                                         data-paging="true"
                                         data-radio="true"
                                         data-layVerify="required"
                                         data-direction="down"
                                    ></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">圣遗物</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="top_main_role_relics"
                                         data-sourceType="route"
                                         data-source="/admin.genshinteam.relics/relics"
                                         data-textField="relics_name"
                                         data-valueField="id"
                                         data-paging="true"
                                         data-radio="false"
                                         data-max="2"
                                         data-layVerify="required"
                                         data-direction="down"
                                    ></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">主词条</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-layVerify="require"
                                         data-name="top_main_role_tag"
                                         data-sourceType="data"
                                         data-radio="false"
                                         data-max="3"
                                         data-source="[{'value' : '生命值','name' : '生命值'},{'value' : '攻击力','name' : '攻击力'},{'value' : '攻击力百分比','name' : '攻击力百分比'},{'value' : '生命值百分比','name' : '生命值百分比'},{'value' : '防御力百分比','name' : '防御力百分比'},{'value' : '元素精通','name' : '元素精通'},{'value' : '元素充能效率','name' : '元素充能效率'},{'value' : '暴击率','name' : '暴击率'},{'value' : '暴击伤害','name' : '暴击伤害'},{'value' : '火元素伤害加成','name' : '火元素伤害加成'},{'value' : '风元素伤害加成','name' : '风元素伤害加成'},{'value' : '水元素伤害加成','name' : '水元素伤害加成'},{'value' : '雷元素伤害加成','name' : '雷元素伤害加成'},{'value' : '冰元素伤害加成','name' : '冰元素伤害加成'},{'value' : '岩元素伤害加成','name' : '岩元素伤害加成'},{'value' : '草元素伤害加成','name' : '草元素伤害加成'},{'value' : '物理伤害加成','name' : '物理伤害加成'},{'value' : '治疗加成','name' : '治疗加成'},{'value' : '防御力','name' : '防御力'}]"

                                    ></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">副词条推荐</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="top_main_role_recommend"
                                         data-sourceType="data"
                                         data-radio="false"
                                         data-max="3"
                                         data-source="[{'value' : '生命值','name' : '生命值'},{'value' : '攻击力','name' : '攻击力'},{'value' : '攻击力百分比','name' : '攻击力百分比'},{'value' : '生命值百分比','name' : '生命值百分比'},{'value' : '防御力百分比','name' : '防御力百分比'},{'value' : '元素精通','name' : '元素精通'},{'value' : '元素充能效率','name' : '元素充能效率'},{'value' : '暴击率','name' : '暴击率'},{'value' : '暴击伤害','name' : '暴击伤害'},{'value' : '火元素伤害加成','name' : '火元素伤害加成'},{'value' : '风元素伤害加成','name' : '风元素伤害加成'},{'value' : '水元素伤害加成','name' : '水元素伤害加成'},{'value' : '雷元素伤害加成','name' : '雷元素伤害加成'},{'value' : '冰元素伤害加成','name' : '冰元素伤害加成'},{'value' : '岩元素伤害加成','name' : '岩元素伤害加成'},{'value' : '草元素伤害加成','name' : '草元素伤害加成'},{'value' : '物理伤害加成','name' : '物理伤害加成'},{'value' : '治疗加成','name' : '治疗加成'},{'value' : '防御力','name' : '防御力'}]"

                                    ></div>
                                </div>
                            </div>
                        </div>
                        <blockquote class="layui-elem-quote">位置2</blockquote>
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">角色</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="top_vice_role_id"
                                         data-sourceType="route"
                                         data-source="/admin.genshinteam.role/index"
                                         data-textField="role_name"
                                         data-valueField="id"
                                         data-paging="true"
                                         data-radio="true"
                                         data-layVerify="required"
                                         data-direction="down"
                                    ></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">位置</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="top_vice_role_pos"
                                         data-sourceType="data"
                                         data-radio="true"
                                         data-source="[{name:'主C',value:'主C'},{name:'副C',value:'副C'},{name:'辅助',value:'辅助'},{name:'治疗',value:'治疗'}]"
                                    ></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">武器</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="top_vice_role_weapon"
                                         data-sourceType="route"
                                         data-source="/admin.genshinteam.weapon/weapon"
                                         data-textField="name"
                                         data-valueField="weapon_id"
                                         data-paging="true"
                                         data-radio="true"
                                         data-layVerify="required"
                                         data-direction="down"
                                    ></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">圣遗物</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="top_vice_role_relics"
                                         data-sourceType="route"
                                         data-source="/admin.genshinteam.relics/relics"
                                         data-textField="relics_name"
                                         data-valueField="id"
                                         data-paging="true"
                                         data-radio="false"
                                         data-max="2"
                                         data-layVerify="required"
                                         data-direction="down"
                                    ></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">主词条</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-layVerify="require"
                                         data-name="top_vice_role_tag"
                                         data-sourceType="data"
                                         data-radio="false"
                                         data-max="3"
                                         data-source="[{'value' : '生命值','name' : '生命值'},{'value' : '攻击力','name' : '攻击力'},{'value' : '攻击力百分比','name' : '攻击力百分比'},{'value' : '生命值百分比','name' : '生命值百分比'},{'value' : '防御力百分比','name' : '防御力百分比'},{'value' : '元素精通','name' : '元素精通'},{'value' : '元素充能效率','name' : '元素充能效率'},{'value' : '暴击率','name' : '暴击率'},{'value' : '暴击伤害','name' : '暴击伤害'},{'value' : '火元素伤害加成','name' : '火元素伤害加成'},{'value' : '风元素伤害加成','name' : '风元素伤害加成'},{'value' : '水元素伤害加成','name' : '水元素伤害加成'},{'value' : '雷元素伤害加成','name' : '雷元素伤害加成'},{'value' : '冰元素伤害加成','name' : '冰元素伤害加成'},{'value' : '岩元素伤害加成','name' : '岩元素伤害加成'},{'value' : '草元素伤害加成','name' : '草元素伤害加成'},{'value' : '物理伤害加成','name' : '物理伤害加成'},{'value' : '治疗加成','name' : '治疗加成'},{'value' : '防御力','name' : '防御力'}]"

                                    ></div>
                                </div>
                            </div>

                            <div class="layui-inline">
                                <label class="layui-form-label">副词条推荐</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="top_vice_role_recommend"
                                         data-sourceType="data"
                                         data-radio="false"
                                         data-max="3"
                                         data-source="[{'value' : '生命值','name' : '生命值'},{'value' : '攻击力','name' : '攻击力'},{'value' : '攻击力百分比','name' : '攻击力百分比'},{'value' : '生命值百分比','name' : '生命值百分比'},{'value' : '防御力百分比','name' : '防御力百分比'},{'value' : '元素精通','name' : '元素精通'},{'value' : '元素充能效率','name' : '元素充能效率'},{'value' : '暴击率','name' : '暴击率'},{'value' : '暴击伤害','name' : '暴击伤害'},{'value' : '火元素伤害加成','name' : '火元素伤害加成'},{'value' : '风元素伤害加成','name' : '风元素伤害加成'},{'value' : '水元素伤害加成','name' : '水元素伤害加成'},{'value' : '雷元素伤害加成','name' : '雷元素伤害加成'},{'value' : '冰元素伤害加成','name' : '冰元素伤害加成'},{'value' : '岩元素伤害加成','name' : '岩元素伤害加成'},{'value' : '草元素伤害加成','name' : '草元素伤害加成'},{'value' : '物理伤害加成','name' : '物理伤害加成'},{'value' : '治疗加成','name' : '治疗加成'},{'value' : '防御力','name' : '防御力'}]"

                                    ></div>
                                </div>
                            </div>
                        </div>
                        <blockquote class="layui-elem-quote">位置3</blockquote>
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">角色</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="top_assist1_role_id"
                                         data-sourceType="route"
                                         data-source="/admin.genshinteam.role/index"
                                         data-textField="role_name"
                                         data-valueField="id"
                                         data-paging="true"
                                         data-radio="true"
                                         data-layVerify="required"
                                         data-direction="down"
                                    ></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">位置</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="top_assist1_role_pos"
                                         data-sourceType="data"
                                         data-radio="true"
                                         data-source="[{name:'主C',value:'主C'},{name:'副C',value:'副C'},{name:'辅助',value:'辅助'},{name:'治疗',value:'治疗'}]"
                                    ></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">武器</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="top_assist1_role_weapon"
                                         data-sourceType="route"
                                         data-source="/admin.genshinteam.weapon/weapon"
                                         data-textField="name"
                                         data-valueField="weapon_id"
                                         data-paging="true"
                                         data-radio="true"
                                         data-layVerify="required"
                                         data-direction="down"
                                    ></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">圣遗物</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="top_assist1_role_relics"
                                         data-sourceType="route"
                                         data-source="/admin.genshinteam.relics/relics"
                                         data-textField="relics_name"
                                         data-valueField="id"
                                         data-paging="true"
                                         data-radio="false"
                                         data-max="2"
                                         data-layVerify="required"
                                         data-direction="down"
                                    ></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">主词条</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-layVerify="require"
                                         data-name="top_assist1_role_tag"
                                         data-sourceType="data"
                                         data-radio="false"
                                         data-max="3"
                                         data-source="[{'value' : '生命值','name' : '生命值'},{'value' : '攻击力','name' : '攻击力'},{'value' : '攻击力百分比','name' : '攻击力百分比'},{'value' : '生命值百分比','name' : '生命值百分比'},{'value' : '防御力百分比','name' : '防御力百分比'},{'value' : '元素精通','name' : '元素精通'},{'value' : '元素充能效率','name' : '元素充能效率'},{'value' : '暴击率','name' : '暴击率'},{'value' : '暴击伤害','name' : '暴击伤害'},{'value' : '火元素伤害加成','name' : '火元素伤害加成'},{'value' : '风元素伤害加成','name' : '风元素伤害加成'},{'value' : '水元素伤害加成','name' : '水元素伤害加成'},{'value' : '雷元素伤害加成','name' : '雷元素伤害加成'},{'value' : '冰元素伤害加成','name' : '冰元素伤害加成'},{'value' : '岩元素伤害加成','name' : '岩元素伤害加成'},{'value' : '草元素伤害加成','name' : '草元素伤害加成'},{'value' : '物理伤害加成','name' : '物理伤害加成'},{'value' : '治疗加成','name' : '治疗加成'},{'value' : '防御力','name' : '防御力'}]"

                                    ></div>
                                </div>
                            </div>

                            <div class="layui-inline">
                                <label class="layui-form-label">副词条推荐</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="top_assist1_role_recommend"
                                         data-sourceType="data"
                                         data-radio="false"
                                         data-max="3"
                                         data-source="[{'value' : '生命值','name' : '生命值'},{'value' : '攻击力','name' : '攻击力'},{'value' : '攻击力百分比','name' : '攻击力百分比'},{'value' : '生命值百分比','name' : '生命值百分比'},{'value' : '防御力百分比','name' : '防御力百分比'},{'value' : '元素精通','name' : '元素精通'},{'value' : '元素充能效率','name' : '元素充能效率'},{'value' : '暴击率','name' : '暴击率'},{'value' : '暴击伤害','name' : '暴击伤害'},{'value' : '火元素伤害加成','name' : '火元素伤害加成'},{'value' : '风元素伤害加成','name' : '风元素伤害加成'},{'value' : '水元素伤害加成','name' : '水元素伤害加成'},{'value' : '雷元素伤害加成','name' : '雷元素伤害加成'},{'value' : '冰元素伤害加成','name' : '冰元素伤害加成'},{'value' : '岩元素伤害加成','name' : '岩元素伤害加成'},{'value' : '草元素伤害加成','name' : '草元素伤害加成'},{'value' : '物理伤害加成','name' : '物理伤害加成'},{'value' : '治疗加成','name' : '治疗加成'},{'value' : '防御力','name' : '防御力'}]"

                                    ></div>
                                </div>
                            </div>
                        </div>
                        <blockquote class="layui-elem-quote">位置4</blockquote>
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">角色</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="top_assist2_role_id"
                                         data-sourceType="route"
                                         data-source="/admin.genshinteam.role/index"
                                         data-textField="role_name"
                                         data-valueField="id"
                                         data-paging="true"
                                         data-radio="true"
                                         data-layVerify="required"
                                         data-direction="down"
                                    ></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">位置</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="top_assist2_role_pos"
                                         data-sourceType="data"
                                         data-radio="true"
                                         data-source="[{name:'主C',value:'主C'},{name:'副C',value:'副C'},{name:'辅助',value:'辅助'},{name:'治疗',value:'治疗'}]"
                                    ></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">武器</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="top_assist2_role_weapon"
                                         data-sourceType="route"
                                         data-source="/admin.genshinteam.weapon/weapon"
                                         data-textField="name"
                                         data-valueField="weapon_id"
                                         data-paging="true"
                                         data-radio="true"
                                         data-layVerify="required"
                                         data-direction="down"
                                    ></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">圣遗物</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="top_assist2_role_relics"
                                         data-sourceType="route"
                                         data-source="/admin.genshinteam.relics/relics"
                                         data-textField="relics_name"
                                         data-valueField="id"
                                         data-paging="true"
                                         data-radio="false"
                                         data-max="2"
                                         data-layVerify="required"
                                         data-direction="down"
                                    ></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">主词条</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-layVerify="require"
                                         data-name="top_assist2_role_tag"
                                         data-sourceType="data"
                                         data-radio="false"
                                         data-max="3"
                                         data-source="[{'value' : '生命值','name' : '生命值'},{'value' : '攻击力','name' : '攻击力'},{'value' : '攻击力百分比','name' : '攻击力百分比'},{'value' : '生命值百分比','name' : '生命值百分比'},{'value' : '防御力百分比','name' : '防御力百分比'},{'value' : '元素精通','name' : '元素精通'},{'value' : '元素充能效率','name' : '元素充能效率'},{'value' : '暴击率','name' : '暴击率'},{'value' : '暴击伤害','name' : '暴击伤害'},{'value' : '火元素伤害加成','name' : '火元素伤害加成'},{'value' : '风元素伤害加成','name' : '风元素伤害加成'},{'value' : '水元素伤害加成','name' : '水元素伤害加成'},{'value' : '雷元素伤害加成','name' : '雷元素伤害加成'},{'value' : '冰元素伤害加成','name' : '冰元素伤害加成'},{'value' : '岩元素伤害加成','name' : '岩元素伤害加成'},{'value' : '草元素伤害加成','name' : '草元素伤害加成'},{'value' : '物理伤害加成','name' : '物理伤害加成'},{'value' : '治疗加成','name' : '治疗加成'},{'value' : '防御力','name' : '防御力'}]"

                                    ></div>
                                </div>
                            </div>

                            <div class="layui-inline">
                                <label class="layui-form-label">副词条推荐</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="top_assist2_role_recommend"
                                         data-sourceType="data"
                                         data-radio="false"
                                         data-max="3"
                                         data-source="[{'value' : '生命值','name' : '生命值'},{'value' : '攻击力','name' : '攻击力'},{'value' : '攻击力百分比','name' : '攻击力百分比'},{'value' : '生命值百分比','name' : '生命值百分比'},{'value' : '防御力百分比','name' : '防御力百分比'},{'value' : '元素精通','name' : '元素精通'},{'value' : '元素充能效率','name' : '元素充能效率'},{'value' : '暴击率','name' : '暴击率'},{'value' : '暴击伤害','name' : '暴击伤害'},{'value' : '火元素伤害加成','name' : '火元素伤害加成'},{'value' : '风元素伤害加成','name' : '风元素伤害加成'},{'value' : '水元素伤害加成','name' : '水元素伤害加成'},{'value' : '雷元素伤害加成','name' : '雷元素伤害加成'},{'value' : '冰元素伤害加成','name' : '冰元素伤害加成'},{'value' : '岩元素伤害加成','name' : '岩元素伤害加成'},{'value' : '草元素伤害加成','name' : '草元素伤害加成'},{'value' : '物理伤害加成','name' : '物理伤害加成'},{'value' : '治疗加成','name' : '治疗加成'},{'value' : '防御力','name' : '防御力'}]"

                                    ></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-input-block layui-anim" data-anim="layui-anim-down" id="under_team" is_show="0" style="display: none">
                    <div class="layui-panel" style="padding: 5px;margin-top: 20px">
                        <label class="layui-btn layui-btn-primary layui-border-green" style="text-align: left !important;">下行阵容</label>
                        <blockquote class="layui-elem-quote" style="margin-top: 10px">位置1</blockquote>
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">角色</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="bottom_main_role_id"
                                         data-sourceType="route"
                                         data-source="/admin.genshinteam.role/index"
                                         data-textField="role_name"
                                         data-valueField="id"
                                         data-paging="true"
                                         data-radio="true"
                                         data-direction="down"
                                    ></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">位置</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="bottom_main_role_pos"
                                         data-sourceType="data"
                                         data-radio="true"
                                         data-source="[{name:'主C',value:'主C'},{name:'副C',value:'副C'},{name:'辅助',value:'辅助'},{name:'治疗',value:'治疗'}]"
                                    ></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">武器</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="bottom_main_role_weapon"
                                         data-sourceType="route"
                                         data-source="/admin.genshinteam.weapon/weapon"
                                         data-textField="name"
                                         data-valueField="weapon_id"
                                         data-paging="true"
                                         data-radio="true"
                                         data-direction="down"
                                    ></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">圣遗物</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="bottom_main_role_relics"
                                         data-sourceType="route"
                                         data-source="/admin.genshinteam.relics/relics"
                                         data-textField="relics_name"
                                         data-valueField="id"
                                         data-paging="true"
                                         data-radio="false"
                                         data-max="2"
                                         data-direction="down"
                                    ></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">主词条</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="bottom_main_role_tag"
                                         data-sourceType="data"
                                         data-radio="false"
                                         data-max="3"
                                         data-source="[{'value' : '生命值','name' : '生命值'},{'value' : '攻击力','name' : '攻击力'},{'value' : '攻击力百分比','name' : '攻击力百分比'},{'value' : '生命值百分比','name' : '生命值百分比'},{'value' : '防御力百分比','name' : '防御力百分比'},{'value' : '元素精通','name' : '元素精通'},{'value' : '元素充能效率','name' : '元素充能效率'},{'value' : '暴击率','name' : '暴击率'},{'value' : '暴击伤害','name' : '暴击伤害'},{'value' : '火元素伤害加成','name' : '火元素伤害加成'},{'value' : '风元素伤害加成','name' : '风元素伤害加成'},{'value' : '水元素伤害加成','name' : '水元素伤害加成'},{'value' : '雷元素伤害加成','name' : '雷元素伤害加成'},{'value' : '冰元素伤害加成','name' : '冰元素伤害加成'},{'value' : '岩元素伤害加成','name' : '岩元素伤害加成'},{'value' : '草元素伤害加成','name' : '草元素伤害加成'},{'value' : '物理伤害加成','name' : '物理伤害加成'},{'value' : '治疗加成','name' : '治疗加成'},{'value' : '防御力','name' : '防御力'}]"

                                    ></div>
                                </div>
                            </div>

                            <div class="layui-inline">
                                <label class="layui-form-label">副词条推荐</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="bottom_main_role_recommend"
                                         data-sourceType="data"
                                         data-radio="false"
                                         data-max="3"
                                         data-source="[{'value' : '生命值','name' : '生命值'},{'value' : '攻击力','name' : '攻击力'},{'value' : '攻击力百分比','name' : '攻击力百分比'},{'value' : '生命值百分比','name' : '生命值百分比'},{'value' : '防御力百分比','name' : '防御力百分比'},{'value' : '元素精通','name' : '元素精通'},{'value' : '元素充能效率','name' : '元素充能效率'},{'value' : '暴击率','name' : '暴击率'},{'value' : '暴击伤害','name' : '暴击伤害'},{'value' : '火元素伤害加成','name' : '火元素伤害加成'},{'value' : '风元素伤害加成','name' : '风元素伤害加成'},{'value' : '水元素伤害加成','name' : '水元素伤害加成'},{'value' : '雷元素伤害加成','name' : '雷元素伤害加成'},{'value' : '冰元素伤害加成','name' : '冰元素伤害加成'},{'value' : '岩元素伤害加成','name' : '岩元素伤害加成'},{'value' : '草元素伤害加成','name' : '草元素伤害加成'},{'value' : '物理伤害加成','name' : '物理伤害加成'},{'value' : '治疗加成','name' : '治疗加成'},{'value' : '防御力','name' : '防御力'}]"

                                    ></div>
                                </div>
                            </div>
                        </div>
                        <blockquote class="layui-elem-quote">位置2</blockquote>
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">角色</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="bottom_vice_role_id"
                                         data-sourceType="route"
                                         data-source="/admin.genshinteam.role/index"
                                         data-textField="role_name"
                                         data-valueField="id"
                                         data-paging="true"
                                         data-radio="true"
                                         data-direction="down"
                                    ></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">位置</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="bottom_vice_role_pos"
                                         data-sourceType="data"
                                         data-radio="true"
                                         data-source="[{name:'主C',value:'主C'},{name:'副C',value:'副C'},{name:'辅助',value:'辅助'},{name:'治疗',value:'治疗'}]"
                                    ></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">武器</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="bottom_vice_role_weapon"
                                         data-sourceType="route"
                                         data-source="/admin.genshinteam.weapon/weapon"
                                         data-textField="name"
                                         data-valueField="weapon_id"
                                         data-paging="true"
                                         data-radio="true"
                                         data-direction="down"
                                    ></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">圣遗物</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="bottom_vice_role_relics"
                                         data-sourceType="route"
                                         data-source="/admin.genshinteam.relics/relics"
                                         data-textField="relics_name"
                                         data-valueField="id"
                                         data-paging="true"
                                         data-radio="false"
                                         data-max="2"
                                         data-direction="down"
                                    ></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">主词条</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="bottom_vice_role_tag"
                                         data-sourceType="data"
                                         data-radio="false"
                                         data-max="3"
                                         data-source="[{'value' : '生命值','name' : '生命值'},{'value' : '攻击力','name' : '攻击力'},{'value' : '攻击力百分比','name' : '攻击力百分比'},{'value' : '生命值百分比','name' : '生命值百分比'},{'value' : '防御力百分比','name' : '防御力百分比'},{'value' : '元素精通','name' : '元素精通'},{'value' : '元素充能效率','name' : '元素充能效率'},{'value' : '暴击率','name' : '暴击率'},{'value' : '暴击伤害','name' : '暴击伤害'},{'value' : '火元素伤害加成','name' : '火元素伤害加成'},{'value' : '风元素伤害加成','name' : '风元素伤害加成'},{'value' : '水元素伤害加成','name' : '水元素伤害加成'},{'value' : '雷元素伤害加成','name' : '雷元素伤害加成'},{'value' : '冰元素伤害加成','name' : '冰元素伤害加成'},{'value' : '岩元素伤害加成','name' : '岩元素伤害加成'},{'value' : '草元素伤害加成','name' : '草元素伤害加成'},{'value' : '物理伤害加成','name' : '物理伤害加成'},{'value' : '治疗加成','name' : '治疗加成'},{'value' : '防御力','name' : '防御力'}]"

                                    ></div>
                                </div>
                            </div>

                            <div class="layui-inline">
                                <label class="layui-form-label">副词条推荐</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="bottom_vice_role_recommend"
                                         data-sourceType="data"
                                         data-radio="false"
                                         data-max="3"
                                         data-source="[{'value' : '生命值','name' : '生命值'},{'value' : '攻击力','name' : '攻击力'},{'value' : '攻击力百分比','name' : '攻击力百分比'},{'value' : '生命值百分比','name' : '生命值百分比'},{'value' : '防御力百分比','name' : '防御力百分比'},{'value' : '元素精通','name' : '元素精通'},{'value' : '元素充能效率','name' : '元素充能效率'},{'value' : '暴击率','name' : '暴击率'},{'value' : '暴击伤害','name' : '暴击伤害'},{'value' : '火元素伤害加成','name' : '火元素伤害加成'},{'value' : '风元素伤害加成','name' : '风元素伤害加成'},{'value' : '水元素伤害加成','name' : '水元素伤害加成'},{'value' : '雷元素伤害加成','name' : '雷元素伤害加成'},{'value' : '冰元素伤害加成','name' : '冰元素伤害加成'},{'value' : '岩元素伤害加成','name' : '岩元素伤害加成'},{'value' : '草元素伤害加成','name' : '草元素伤害加成'},{'value' : '物理伤害加成','name' : '物理伤害加成'},{'value' : '治疗加成','name' : '治疗加成'},{'value' : '防御力','name' : '防御力'}]"

                                    ></div>
                                </div>
                            </div>
                        </div>
                        <blockquote class="layui-elem-quote">位置3</blockquote>
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">角色</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="bottom_assist1_role_id"
                                         data-sourceType="route"
                                         data-source="/admin.genshinteam.role/index"
                                         data-textField="role_name"
                                         data-valueField="id"
                                         data-paging="true"
                                         data-radio="true"
                                         data-direction="down"
                                    ></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">位置</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="bottom_assist1_role_pos"
                                         data-sourceType="data"
                                         data-radio="true"
                                         data-source="[{name:'主C',value:'主C'},{name:'副C',value:'副C'},{name:'辅助',value:'辅助'},{name:'治疗',value:'治疗'}]"
                                    ></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">武器</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="bottom_assist1_role_weapon"
                                         data-sourceType="route"
                                         data-source="/admin.genshinteam.weapon/weapon"
                                         data-textField="name"
                                         data-valueField="weapon_id"
                                         data-paging="true"
                                         data-radio="true"
                                         data-direction="down"
                                    ></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">圣遗物</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="bottom_assist1_role_relics"
                                         data-sourceType="route"
                                         data-source="/admin.genshinteam.relics/relics"
                                         data-textField="relics_name"
                                         data-valueField="id"
                                         data-paging="true"
                                         data-radio="false"
                                         data-max="2"
                                         data-direction="down"
                                    ></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">主词条</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="bottom_assist1_role_tag"
                                         data-sourceType="data"
                                         data-radio="false"
                                         data-max="3"
                                         data-source="[{'value' : '生命值','name' : '生命值'},{'value' : '攻击力','name' : '攻击力'},{'value' : '攻击力百分比','name' : '攻击力百分比'},{'value' : '生命值百分比','name' : '生命值百分比'},{'value' : '防御力百分比','name' : '防御力百分比'},{'value' : '元素精通','name' : '元素精通'},{'value' : '元素充能效率','name' : '元素充能效率'},{'value' : '暴击率','name' : '暴击率'},{'value' : '暴击伤害','name' : '暴击伤害'},{'value' : '火元素伤害加成','name' : '火元素伤害加成'},{'value' : '风元素伤害加成','name' : '风元素伤害加成'},{'value' : '水元素伤害加成','name' : '水元素伤害加成'},{'value' : '雷元素伤害加成','name' : '雷元素伤害加成'},{'value' : '冰元素伤害加成','name' : '冰元素伤害加成'},{'value' : '岩元素伤害加成','name' : '岩元素伤害加成'},{'value' : '草元素伤害加成','name' : '草元素伤害加成'},{'value' : '物理伤害加成','name' : '物理伤害加成'},{'value' : '治疗加成','name' : '治疗加成'},{'value' : '防御力','name' : '防御力'}]"

                                    ></div>
                                </div>
                            </div>

                            <div class="layui-inline">
                                <label class="layui-form-label">副词条推荐</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="bottom_assist1_role_recommend"
                                         data-sourceType="data"
                                         data-radio="false"
                                         data-max="3"
                                         data-source="[{'value' : '生命值','name' : '生命值'},{'value' : '攻击力','name' : '攻击力'},{'value' : '攻击力百分比','name' : '攻击力百分比'},{'value' : '生命值百分比','name' : '生命值百分比'},{'value' : '防御力百分比','name' : '防御力百分比'},{'value' : '元素精通','name' : '元素精通'},{'value' : '元素充能效率','name' : '元素充能效率'},{'value' : '暴击率','name' : '暴击率'},{'value' : '暴击伤害','name' : '暴击伤害'},{'value' : '火元素伤害加成','name' : '火元素伤害加成'},{'value' : '风元素伤害加成','name' : '风元素伤害加成'},{'value' : '水元素伤害加成','name' : '水元素伤害加成'},{'value' : '雷元素伤害加成','name' : '雷元素伤害加成'},{'value' : '冰元素伤害加成','name' : '冰元素伤害加成'},{'value' : '岩元素伤害加成','name' : '岩元素伤害加成'},{'value' : '草元素伤害加成','name' : '草元素伤害加成'},{'value' : '物理伤害加成','name' : '物理伤害加成'},{'value' : '治疗加成','name' : '治疗加成'},{'value' : '防御力','name' : '防御力'}]"

                                    ></div>
                                </div>
                            </div>
                        </div>
                        <blockquote class="layui-elem-quote">位置4</blockquote>
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">角色</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="bottom_assist2_role_id"
                                         data-sourceType="route"
                                         data-source="/admin.genshinteam.role/index"
                                         data-textField="role_name"
                                         data-valueField="id"
                                         data-paging="true"
                                         data-radio="true"
                                         data-direction="down"
                                    ></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">位置</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="bottom_assist2_role_pos"
                                         data-sourceType="data"
                                         data-radio="true"
                                         data-source="[{name:'主C',value:'主C'},{name:'副C',value:'副C'},{name:'辅助',value:'辅助'},{name:'治疗',value:'治疗'}]"
                                    ></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">武器</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="bottom_assist2_role_weapon"
                                         data-sourceType="route"
                                         data-source="/admin.genshinteam.weapon/weapon"
                                         data-textField="name"
                                         data-valueField="weapon_id"
                                         data-paging="true"
                                         data-radio="true"
                                         data-direction="down"
                                    ></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">圣遗物</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="bottom_assist2_role_relics"
                                         data-sourceType="route"
                                         data-source="/admin.genshinteam.relics/relics"
                                         data-textField="relics_name"
                                         data-valueField="id"
                                         data-paging="true"
                                         data-radio="false"
                                         data-max="2"
                                         data-direction="down"
                                    ></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">主词条</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="bottom_assist2_role_tag"
                                         data-sourceType="data"
                                         data-radio="false"
                                         data-max="3"
                                         data-source="[{'value' : '生命值','name' : '生命值'},{'value' : '攻击力','name' : '攻击力'},{'value' : '攻击力百分比','name' : '攻击力百分比'},{'value' : '生命值百分比','name' : '生命值百分比'},{'value' : '防御力百分比','name' : '防御力百分比'},{'value' : '元素精通','name' : '元素精通'},{'value' : '元素充能效率','name' : '元素充能效率'},{'value' : '暴击率','name' : '暴击率'},{'value' : '暴击伤害','name' : '暴击伤害'},{'value' : '火元素伤害加成','name' : '火元素伤害加成'},{'value' : '风元素伤害加成','name' : '风元素伤害加成'},{'value' : '水元素伤害加成','name' : '水元素伤害加成'},{'value' : '雷元素伤害加成','name' : '雷元素伤害加成'},{'value' : '冰元素伤害加成','name' : '冰元素伤害加成'},{'value' : '岩元素伤害加成','name' : '岩元素伤害加成'},{'value' : '草元素伤害加成','name' : '草元素伤害加成'},{'value' : '物理伤害加成','name' : '物理伤害加成'},{'value' : '治疗加成','name' : '治疗加成'},{'value' : '防御力','name' : '防御力'}]"
                                    ></div>
                                </div>
                            </div>

                            <div class="layui-inline">
                                <label class="layui-form-label">副词条推荐</label>
                                <div class="layui-input-block two-part-label">
                                    <div class="xmSelect"
                                         data-name="bottom_assist2_role_recommend"
                                         data-sourceType="data"
                                         data-radio="false"
                                         data-max="3"
                                         data-source="[{'value' : '生命值','name' : '生命值'},{'value' : '攻击力','name' : '攻击力'},{'value' : '攻击力百分比','name' : '攻击力百分比'},{'value' : '生命值百分比','name' : '生命值百分比'},{'value' : '防御力百分比','name' : '防御力百分比'},{'value' : '元素精通','name' : '元素精通'},{'value' : '元素充能效率','name' : '元素充能效率'},{'value' : '暴击率','name' : '暴击率'},{'value' : '暴击伤害','name' : '暴击伤害'},{'value' : '火元素伤害加成','name' : '火元素伤害加成'},{'value' : '风元素伤害加成','name' : '风元素伤害加成'},{'value' : '水元素伤害加成','name' : '水元素伤害加成'},{'value' : '雷元素伤害加成','name' : '雷元素伤害加成'},{'value' : '冰元素伤害加成','name' : '冰元素伤害加成'},{'value' : '岩元素伤害加成','name' : '岩元素伤害加成'},{'value' : '草元素伤害加成','name' : '草元素伤害加成'},{'value' : '物理伤害加成','name' : '物理伤害加成'},{'value' : '治疗加成','name' : '治疗加成'},{'value' : '防御力','name' : '防御力'}]"
                                    ></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label"><text style="color:red;">*</text>阵容描述</label>
                <div class="layui-input-block">
                    <textarea placeholder="请输入阵容描述" name="team_desc" class="layui-textarea" lay-verify="required"></textarea>
                </div>
            </div>

        </div>
    </div>
    <div class="bottom">
        <div class="button-container">
            <button type="submit" class="laytp-btn laytp-btn-primary laytp-btn-sm" lay-submit="" lay-filter="add">
                <i class="layui-icon layui-icon-ok"></i>
                提交
            </button>
            <button type="reset" class="laytp-btn laytp-btn-sm">
                <i class="layui-icon layui-icon-refresh"></i>
                重置
            </button>
        </div>
    </div>
</form>
<script>
    if(localStorage.getItem("staticDomain")){
        document.write("<link rel='stylesheet' href='" + localStorage.getItem("staticDomain") + "/component/layui/css/layui.css?v=" + localStorage.getItem("version") + "'>");
        document.write("<script src='" + localStorage.getItem("staticDomain") + "/component/layui/layui.js?v="+localStorage.getItem("version")+"'><\/script>");
        document.write("<script src='" + localStorage.getItem("staticDomain") + "/component/laytp/layuiConfig.js?v="+localStorage.getItem("version")+"'><\/script>");
    }else{
        document.write("<link rel='stylesheet' href='/static/component/layui/css/layui.css?v=" + localStorage.getItem("version") + "'>");
        document.write("<script src='/static/component/layui/layui.js?v="+localStorage.getItem("version")+"'><\/script>");
        document.write("<script src='/static/component/laytp/layuiConfig.js?v="+localStorage.getItem("version")+"'><\/script>");
    }
</script>
<script>

    window.changePass = function(params){
         console.log(params);
         var selected = [];
         var type = '';
         layui.each(params.arr,function(key,item){
             selected.push(item.name);
             type = item.type;
         })
         console.log(selected)
         //xmResetSelect('#pass',selected,type);
 
         //params是一个对象，有arr、change、isAdd三个属性
         //arr是当前选中项组成的数组，是完成change或者说是click事件后留下的选中项
         //change是点击下拉框项组成的数组，因为xmSelect支持下拉框分组，树形结构列表，能点击一个按钮选中/取消选中多个项目，所以也是一个数组
         //isAdd表示change里面的内容是选中，还是取消选中操作
     }


    function xmResetSelect(parentElem,selected,select_id) {
        let obj = (typeof parentElem === "undefined") ? $(".xmSelect") : $(parentElem);
        layui.each(obj, function (key, item) {
            let name = $(item).data("name");
            if (!name) facade.error("xmSelect组件未定义name属性");
            let sourceType = $(item).data("sourcetype") ? $(item).data("sourcetype") : "data";
            let source = $(item).data("source");
            if (!source) {
                facade.error('xmSelect插件未定义source');
                return false;
            }
            source = source.toString();
            let textField = $(item).data("textfield") ? $(item).data("textfield") : 'name';
            let subTextField = $(item).data("subtextfield");
            let radio = $(item).data("radio") === true;
            let strict = (typeof $(item).data("strict") !== "undefined") ? $(item).data("strict") : !radio;
            //这里是第一次渲染
            let option_new = {
                el: item
                , name: name
                , language: 'zn'
                , initValue: selected
                , data: []
                , filterable: true
                , filterMethod: function (val, item, index, prop) {
                    if (val) {
                        //主标题中包含的大小写都搜索出来
                        if (textField && item[textField].toLowerCase().indexOf(val.toLowerCase()) !== -1) {
                            return true;
                            //副标题中包含的大小写都搜索出来
                        } else if (subTextField && item[subTextField].toLowerCase().indexOf(val.toLowerCase()) !== -1) {
                            return true;
                        }
                        return false;//其他的就不要了
                    } else {
                        return true;
                    }
                }
                , radio: radio
                , searchTips: "输入关键字进行搜索"
                , maxMethod: function (selectedData) {
                    facade.error("最多可选" + selectedData.length + "个数据");
                }
                , layVerify: $(item).data("layverify") ? $(item).data("layverify") : ""
                , layVerType: $(item).data("layvertype") ? $(item).data("layvertype") : ""
                , clickClose: $(item).data("radio") === true
                , tips: $(item).data("placeholder") ? $(item).data("placeholder") : "请选择"
                , toolbar: {
                    show: !($(item).data("radio") === true),
                    list: ['ALL', 'REVERSE', 'CLEAR']
                }
                , theme: {
                    color: localStorage.getItem("theme-color-context")
                }
            };
            let max = $(item).data("max");
            if (max) option_new.max = max;
            option_new.direction = $(item).data("direction") ? $(item).data("direction") : "auto";
            option_new.textField = $(item).data("textfield") ? $(item).data("textfield") : "name";
            option_new.subTextField = $(item).data("subtextfield") ? $(item).data("subtextfield") : "";
            option_new.valueField = $(item).data("valuefield") ? $(item).data("valuefield") : "value";
            option_new.iconField = $(item).data("iconfield") ? $(item).data("iconfield") : "";
            option_new.sourceTree = $(item).data("sourcetree") === true;
            option_new.treeType = ($(item).data("treetype") === 'cascader') ? 'cascader' : 'tree';
            option_new.onchange = $(item).data("onchange") ? $(item).data("onchange") : "";
            if (option_new.onchange) {
                option_new.on = function (params) {
                    if (typeof window[option_new.onchange] === "function") {
                        window[option_new.onchange].call(this, params);
                    } else {
                        facade.error(option_new.onchange + "回调函数未定义");
                    }
                };
            }
            //model是设置选中后，input框的模板
            option_new.model = {
                label: {
                    block: {
                        template: function (item) {
                            let template = item[option_new.textField];
                            template = option_new.iconField ? '<i class="' + item[option_new.iconField] + ' margin-right5"></i>' + template : template;
                            return template;
                        },
                    },
                }
            };
            //这里是设置选中后，input框中的每一项，删除图标是否显示
            option_new.model.label.block.showIcon = !($(item).data("radio") === true);
            //这里是设置下拉框前面的单选按钮或者复选框是否显示
            option_new.model.icon = ($(item).data("radio") === true && !option_new.sourceTree) ? "hidden" : "show";
            //template是设置下拉框的模板
            option_new.template = function (item) {
                let template = item.item[option_new.textField];
                template = option_new.iconField ? '<i class="' + item.item[option_new.iconField] + ' margin-right5"></i>' + template : template;
                if(option_new.subTextField.indexOf('.') !== -1){
                    var subTextFieldArr = option_new.subTextField.split('.');
                    if(item.item[subTextFieldArr[0]]){
                        template = template + '<span style="position: absolute; right: 10px; color: #8799a3">' + item.item[subTextFieldArr[0]][subTextFieldArr[1]] + '</span>';
                    }
                }else{
                    template = option_new.subTextField ? template + '<span style="position: absolute; right: 10px; color: #8799a3">' + item.item[option_new.subTextField] + '</span>' : template;
                }
                return template;
            };
            option_new.prop = {
                name: option_new.textField
                , value: option_new.valueField
            };
            if (option_new.sourceTree) {
                if(option_new.treeType === 'tree'){
                    option_new.tree = {
                        //是否显示树状结构
                        show: true,
                        //是否展示三角图标
                        showFolderIcon: true,
                        //是否显示虚线
                        showLine: true,
                        //间距
                        indent: 20,
                        //默认展开节点的数组, 为 true 时, 展开所有节点
                        expandedKeys: true,
                        //是否严格遵守父子模式
                        strict: strict,
                        //是否开启极简模式
                        simple: true,
                        clickExpand: false,
                        clickCheck: true,
                    };
                }else if(option_new.treeType === 'tree-group'){
                    option_new.tree = {
                        //是否显示树状结构
                        show: false,
                        //是否展示三角图标
                        showFolderIcon: true,
                        //是否显示虚线
                        showLine: true,
                        //间距
                        indent: 20,
                        //默认展开节点的数组, 为 true 时, 展开所有节点
                        expandedKeys: true,
                        //是否严格遵守父子模式
                        strict: strict,
                        //是否开启极简模式
                        simple: true,
                        clickExpand: false,
                        clickCheck: true,
                    };
                }else{
                    option_new.cascader = {
                        show: true,
                        indent: 200,
                        //是否严格遵守父子模式
                        strict: strict,
                    };
                }
            }
            option_new.autoRow = true; // 如果选中的项目过多，会自动变动输入框的高度
            if (sourceType === "route") {
                //这个ajax请求无需存入延迟对象数组，因为xmSelect是一个一个进行渲染的，不像layui.form.render()方法，xmSelect没有全局统一方法一次性渲染所有的xmSelect
                //xmSelect的分页效果由js实现，不管分页与否，都查询出所有数据集，参数传递all_data即为查询出所有数据集
                let params = $(item).data("params");
                let ajaxParams = {};
                if(option_new.sourceTree){
                    ajaxParams.is_tree = 1;
                }else{
                    ajaxParams.all_data = 1;
                }
                if (params) {
                    params = eval(params);
                    for (key in params) {
                        ajaxParams[key] = params[key];
                    }
                }
                ajaxParams.select = select_id;
                facade.ajax({
                    method: "GET",
                    route: source,
                    data: ajaxParams,
                    successAlert: false
                }).done(function (res) {
                    let paging = $(item).data("paging") === true;
                    if (paging) {
                        option_new.paging = true;
                        option_new.pageSize = 10;
                    }
                    option_new.data = res.data;
                    window.xmSelectObj[option_new.name] = xmSelect.render(option_new);
                });
            } else if (sourceType === "data") {
                option_new.data = eval(source);
                window.xmSelectObj[option_new.name] = xmSelect.render(option_new);
            }
        });
    }

    function showTeamBox(){
        var is_show = $('#under_team').attr('is_show');
        if(is_show == 1){
            $('#under_team').attr('is_show',0);
            $('#under_team').css('display','none');
            $('#under_team .xmSelect').attr('data-layVerify','');
        }else{
            $('#under_team').attr('is_show',1);
            $('#under_team').css('display','block');
            $('#under_team .xmSelect').attr('data-layVerify','required');
        }
    }
    layui.use(['laytp','xmSelect'], function () {
        //var xmSelect = layui.xmSelect;

        xmSelect.render({
            el: '.ele',
            autoRow: false,
            repeat:true,
            initValue:['anemo','anemo'],
            tree: {
                show: true,
                showFolderIcon: true,
                showLine: true,
                indent: 20,
                expandedKeys: true,
            },
            toolbar: {
                show: true,
                list: ['ALL', 'REVERSE', 'CLEAR']
            },
            filterable: true,
            height: '400px',
            data: [{name:'anemo',value:'anemo'},{name:'cryo',value:'cryo'},{name:'electro',value:'electro'},{name:'geo',value:'geo'},{name:'hydro',value:'hydro'},{name:'pyro',value:'pyro'}],
        });


        layui.form.on('submit(add)', function(data){
            var btnAnim = layui.button.load({elem:$(this)});
            facade.ajax({
                route:'/admin.genshinteam.team/add',
                data : data.field
            }).done(function(res){
                if(res.code === 0){
                    parent.layui.layer.close(parent.layui.layer.getFrameIndex(window.name));//关闭当前页
                    parent.funController.tableRender();
                    parent.parent.renderMenu();//重新渲染菜单
                }
                btnAnim.stop();
            }).fail(function(){
                btnAnim.stop();
            });
            return false;
        });
    });
</script>
</body>
</html>